package com.yz.dadatasource.dynamic;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

@RestController
public class Controller {

    @Autowired
    private OrderService orderService;
    @Autowired
    private DataSource dataSource;

    @GetMapping("/hello")
    public String insert(){
        System.out.println(dataSource);
        orderService.insert20();
        return "hello";
    }
}
